package org.jeecg.modules.demo.crm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.crm.entity.CProjectApplication;
import org.jeecg.modules.demo.crm.entity.CProjectApplicationSimple;
import org.jeecg.modules.demo.crm.entity.CSubProject;

/**
 * @Description: 项目信息
 * @Author: jeecg-boot
 * @Date:   2025-05-28
 * @Version: V1.0
 */
public interface CProjectApplicationSimpleMapper extends BaseMapper<CProjectApplicationSimple> {

    @Select("select * from c_project_application where project_number=#{projectNumber}")
    CSubProject findProjectNumber(@Param("projectNumber") String projectNumber);

    @Select("select is_favorite as isFavorite from c_project_application order by is_favorite desc  limit 1")
    Integer toggleFavoriteMax();
}
